#define sensor 4
#define sen_state digitalRead(sensor)
void setup() {
  pinMode(sensor,INPUT);
  Serial.begin(9600);
}

void loop() {
  Serial.print("sensor=");
  Serial.println(sen_state);
  
}
